<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script>
  function dd(){
	  event = event ? event : window.event; 
	  
	 alert(event.currentTarget.id);
	  
  }
</script>
<body>
  <input id="aaaa" type="checkbox" name="aa" onclick="dd()"/>
</body>
</html>